package com.atguigu.aiproject.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;
@Data
@TableName("creations")
public class Creation {
    @TableId(value = "s_id",type = IdType.AUTO)
    private Integer id;
    @TableField("s_title")//标题
    private String title;
    @TableField("s_content")//内容
    private String content;
    @TableField("s_click")
    private int click;//点击量，不需要传
    @TableField("s_userid")//用户id
    private int userId;
    @TableField("s_cgy")//生成内容分类，1-小说，2-故事，3-散文，4-随笔，5-散文，6-其他
    private int cgyId;//外键，分类表id
    @TableField("s_keyword")//关键字
    private String keyword;
    @TableField(value = "s_createtime",fill =  FieldFill.INSERT)//创建时间,插入时自动填充
    private LocalDateTime createTime;
    @TableField("s_cover_img")
    private String coverImg;
    @TableField("s_review_status")
    private int reviewStatus;

    @TableField(exist = false)
    private String userNickName;
    @TableField(exist = false)
    private String cgyName;
    @TableField(exist = false)//配图
    private String img;
    @TableField(exist = false)
    private Boolean isLike;//是否点赞
    @TableField(exist = false)
    private Boolean isBrowse;//是否浏览
}
